Telegram Group & Telegram Channel
12. Program to Calculate Mean.

import java.util.Scanner;

class CalculateMean
{

public static void main(String[] args)
{

int sum = 0, inputNum;
int counter;
float mean;
Scanner NumScanner = new Scanner(System.in);

System.out.println("Enter the total number of terms whose mean you want to calculate");

counter = NumScanner.nextInt();

System.out.println("Please enter " + counter + " numbers:");

for (int x = 1; x <= counter; x++)
{
inputNum = NumScanner.nextInt();
sum = sum + inputNum;
System.out.println();
}

mean = sum / counter;
System.out.println("The mean of the " + counter + " numbers you entered is " + mean);
}
}

@java_codings



tg-me.com/java_codings/21
Create:
Last Update:

12. Program to Calculate Mean.

import java.util.Scanner;

class CalculateMean
{

public static void main(String[] args)
{

int sum = 0, inputNum;
int counter;
float mean;
Scanner NumScanner = new Scanner(System.in);

System.out.println("Enter the total number of terms whose mean you want to calculate");

counter = NumScanner.nextInt();

System.out.println("Please enter " + counter + " numbers:");

for (int x = 1; x <= counter; x++)
{
inputNum = NumScanner.nextInt();
sum = sum + inputNum;
System.out.println();
}

mean = sum / counter;
System.out.println("The mean of the " + counter + " numbers you entered is " + mean);
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/21

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

Telegram hopes to raise $1bn with a convertible bond private placement

The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.

Advance Java ‍ from vn


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA